package com.example.controller;

import com.example.common.Result;
import com.example.entity.Praise;
import com.example.service.PraiseService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/praise")
public class PraiseController {

    @Resource
    private PraiseService praiseService;

    /**
     * 点赞/取消点赞
     */
    @PutMapping("/update")
    public Result add(@RequestBody Praise praise) {
        praiseService.update(praise);
        return Result.success();
    }

}
